home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 2
/
CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso
/
magazine
/
amiga_e
/
e_v3.2a_extras
/
pdsrc
/
floodwindow.e
< prev
next >
Wrap
Text File
|
1992-09-02
|
3KB
|
81 lines
/*
floodwindow.e
A PROC which will flood inside the borders of any window in any colour
plus wrapper code showing how it works
IMPORTANT NOTE: If you want to know title bar height _before_ you
open your window, eg, for font awareness, you should
use
DEF screen:PTR TO screen,
font:PTR TO textattr
screenfont:= screen.font
titlebarheight:= screen.wbortop+font.ysize+1
When Who What
------- ------- ---------------------------------------------------------
4/3/94 UWP! All of it!
*/
MODULE 'intuition/screens','exec/lists','exec/nodes',
'intuition/intuition',
'intuition/screens','intuition/gadgetclass','graphics/text'
PROC main()
DEF screen:PTR TO screen, window:PTR TO window,class,
imess:PTR TO intuimessage, quit
screen:=(LockPubScreen(NIL)) /* no testing, I assume you have WB :) */
window:=OpenWindowTagList(NIL,[ WA_TOP, screen.height/2,
WA_LEFT, screen.width/2,
WA_INNERWIDTH, screen.width/4,
WA_INNERHEIGHT, screen.height/2,
WA_CLOSEGADGET, TRUE,
WA_DRAGBAR, TRUE,
WA_DEPTHGADGET, TRUE,
WA_SIZEBBOTTOM, TRUE, /* toggle this */
WA_SIZEGADGET, TRUE,
WA_MINHEIGHT, 100,
WA_MINWIDTH, 50,
WA_MAXHEIGHT, -1,
WA_MAXWIDTH, -1,
WA_IDCMP, IDCMP_CLOSEWINDOW OR
IDCMP_CHANGEWINDOW,
WA_TITLE, 'Use me! Abuse me!',
0,0]) /* NB: no checking here either :<*/
floodwindow(window,3)
quit:=FALSE
WHILE quit=FALSE
class:=NIL
IF imess:=GetMsg(window.userport)
class:=imess.class
IF class=IDCMP_CHANGEWINDOW
floodwindow(window,3)
ENDIF
IF class=IDCMP_CLOSEWINDOW
quit:=TRUE
ENDIF
ReplyMsg(imess)
ELSE
WaitPort(window.userport)
ENDIF
ENDWHILE
CloseWindow(window)
UnlockPubScreen(NIL,screen)
ENDPROC
PROC floodwindow(window:PTR TO window,colour)
SetAPen(window.rport,colour)
RectFill(window.rport, window.borderleft,
window.bordertop,
window.width-window.borderright-1,
window.height-window.borderbottom-1)
ENDPROC